FROM php:7-fpm-bullseye

ADD ./install-php-extensions /usr/local/bin/

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
    echo 'request_terminate_timeout = 0' > /usr/local/etc/php/conf.d/beyoit.ini && \
#    echo 'disable_functions = proc_open,pcntl_signal,pcntl_signal_dispatch,pcntl_fork,pcntl_wait,pcntl_alarm' >> /usr/local/etc/php/conf.d/beyoit.ini && \
    apt update && \
    apt install -y net-tools && \
    apt install -y iputils-ping && \
    apt install -y telnet && \
    apt install -y less && \
    apt install -y vim && \
    chmod +x /usr/local/bin/install-php-extensions && \
    install-php-extensions @composer && \
    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && \
    install-php-extensions bcmath && \
    install-php-extensions gd && \
    install-php-extensions mysqli && \
    install-php-extensions pdo_mysql && \
    install-php-extensions redis
